package cn.sciento.farm.devicemanager.common.constant;

public interface MqttConstant {

    // 基本
    String DISCONNECTED = "disconnected";

    String CONNECTED = "connected";

    String OFFLINE = "offline";

    String ONLINE = "online";

    String UP = "up";

    String DOWN = "down";

    String SYS = "sys";


    //MQTT 兼容协议
    //service 前缀
    String PROTOCOL_PREFIX = "mqtt_protocol_";
    //sensor协议
    String PROTOCOL_SENSOR = "stds";
    //原来气象站协议
    String PROTOCOL_WEATHER = "QXZ";

    String PROTOCOL_CURRENT = "COLL";

    String PROTOCOL_LORAWAN = "lorawan";

    String PROTOCOL_USR_LORA = "usrlora";

    String PROTOCOL_INVERTER = "vfd";

    String PROTOCOL_FERTILIZER = "wfm";

    String PROTOCOL_INJECT_FEERTILIZER = "ijwfm";

    String PROTOCOL_FARM = "farm";

    String PROTOCOL_SCREEN = "wled";

    String PROTOCOL_LAMP_INSECT_SITUATION = "ism";

    String PROTOCOL_SOIL = "soil";

    // 传感器
    String SWITCH_TYPE = "CT";

    String COL_TYPE = "CL";


    // 设备相关
    String SEND_SWITCH_TOPIC = "stds/down/CT/%s/sLoop";
    String SEND_SWITCH_BATCH_TOPIC = "stds/down/CT/%s/switch";
    String SCI_GW_CONFIG_TOPIC="stds/down/sys/%s";
    String SEND_BLOCK_ID = "%s-%s-%s";
    String SCI_CONFIG_BLOCK_ID = "sci-config-%s";

    // 变频器
    String INVERTER_CONTROL_BLOCK_ID = "inverter-control-%s";
    String INVERTER_CONTROL_TOPIC = "vfd/down/%s";

    // 水肥机
    // 1、id
    String FERTILIZER_CONFIG_BLOCK_ID ="fertilizer-config-%s";
    String FERTILIZER_DOWN_TOPIC = "wfm/down/%s";
    String FERTILIZER_CONTROL_SUB_BLOCK_ID = "fertilizer-sub-control-%s";
    String FERTILIZER_CONTROL_MAIN_BLOCK_ID = "fertilizer-main-control-%s";

    // 注入式水肥机
    String INJECT_FERTILIZER_CONTROL_BLOCK_ID = "inject-fertilizer-control-%s";
    String INJECT_FERTILIZER_CONTROL_TOPIC = "ijwfm/down/%s/modeControl";

    // 虫情灯
    String ISM_CONTROL_TOPIC = "ism/down/%s";
    String ISM_CONTROL_SWITCH_BLOCK_ID = "ism-control-switch-%s";
    String ISM_CONTROL_PARAM_BLOCK_ID = "ism-control-param-%s";
    // 屏幕
    String SCREEN_DOWN_ID = "wled/down/%s";

    // lorawan
    int NODE_JOIN_CODE = 20;
    int DEVICE_ONLINE_CODE = 1;
    int DEVICE_OFFLINE_CODE = 0;
}
